/*
 * createTime: 2020/2/26 10:17
 * description: 基础配置
 */

import store from 'store';
import { getUrlParams } from '../utils/globalFn';
const baseUrl = (function() {
	// return 'https://zfx-dev.xmonecode.com/api';
	return 'https://zfx.xmonecode.com/api';

	let proxy = getUrlParams('proxy');

	if (proxy) {
		store.set('proxy', proxy);
	} else {
		proxy = store.get('proxy') || 'dev';
	}

	return proxy;

	switch (process.env.NODE_ENV) {
		case 'development':
			return `${proxy}`;
		case 'production':
			return `https://zfx.xmonecode.com/api`;
		default:
			return '';
	}
})();

export { baseUrl };
